package com.cn.wanxi.test;


/**
 *
 */
public class PrintHelloWorld {
    public static void main(String[] args) {
        boolean print = print(5);
        System.out.println(print ? "已经完成" : "打印失败");
    }

    /**
     * @param n
     */
    private static boolean print(int n) {
        boolean aa = false;
        for (int i = 0; i < n; i++) {
            System.out.println("第" + (i + 1) + " 次HelloWorld");

            if (i == n - 1) {
                aa = true;
            }
        }
        return aa;
    }

    private static void aa() {
        for (int i = 0; i < 1; i++) {
            if (i == 2) {
                return;
//                System.out.println(11);
            }
        }
        System.out.println(11);
//        javac HelloWorld.java  编译
//        java HelloWorld
    }
}
